<!--Code for deleting an announcement from the database-->
<?php
if (isset($_POST['submitDelete'])) {

    $name = $_POST['deleteName'];

    include 'DBLibrary/config.php';
    include 'DBLibrary/openDB.php';

    mysql_select_db("rotaract");
    
    $query="DELETE FROM announcement WHERE title = '$name'";
    $result = mysql_query($query)or die(mysql_error());

    $confirm = 'Delete successful!';
}
?>
